package com.wh.stressservice.task;

import com.wh.stressservice.service.IHandlerStress;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@EnableScheduling
@Component
public class ScheduleTak {

    @Resource
    private IHandlerStress handlerStress;

//    @Scheduled(cron = "0/5 * * * * ?")
    @PostConstruct
    public void execute() {
        // System.out.println("-----------> ScheduleTak");
        handlerStress.handlerStress();
    }

    // @Scheduled(cron = "0 20 * * * ?")
    public void handlerStress() {
    }

}
